package com.joysuch.wwyt.bp.repository;

import com.joysuch.wwyt.bp.entity.BPNFCLocation;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

import java.util.List;

public interface BPNFCLocationDao extends JpaRepository<BPNFCLocation, Long>, QuerydslPredicateExecutor<BPNFCLocation> {


    List<BPNFCLocation> findAll();

    public Page<BPNFCLocation> findAll(Specification<BPNFCLocation> spec, Pageable pageable);


    List<BPNFCLocation> findByCode(String code);

    List<BPNFCLocation> findByName(String name);

    List<BPNFCLocation> findByNameAndCode(String name, String code);

    BPNFCLocation findFirstByCode(String code);
}
